#ifndef StepQueryThread_H
#define StepQueryThread_H
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
            TypeName(const TypeName&); \
            void operator=(const TypeName&)

#include <QThread>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QDateTime>
#include <QMessageBox>
#include <QDebug>

class StepQueryThread : public QThread
{
    Q_OBJECT
public:
    StepQueryThread();
    void stopThread();
    const QString getTime() const;
    void setQuery(QString q);
    void setRowCnt(int n);
    ~StepQueryThread();

protected:
    void run();

private:
    DISALLOW_COPY_AND_ASSIGN(StepQueryThread);
//    bool makeConnToDb();

    bool queryStopped = false;
//    QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
    QSqlDatabase db = QSqlDatabase::database();
    QString m_query;
    QStringList queryList;

    int rowCnt = 1;

signals:
    void emitInfo(QStringList);
};

#endif // StepQueryThread_H
